package com.syncshot.androidapp.activities;

import android.os.Bundle;
import android.widget.ImageView;

import com.syncshot.androidapp.R;
import com.syncshot.androidapp.helper.ImageDownloader;
import com.syncshot.androidapp.helper.ImageDownloader.Mode;
import com.syncshot.androidapp.util.WSUtil;

public class PictureResultActivity extends AbstractActivity {
	
    static final String KEY_IMAGE_ID = "imageId";
	private ImageView mResultImageView;

	private int mPictureId;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.screen_picture_result);
		
		mPictureId = getIntent().getIntExtra(KEY_IMAGE_ID, 0);
		
		mResultImageView = (ImageView) findViewById(R.id.resultImageView);

        ImageDownloader downloader = new ImageDownloader(null);
        downloader.setMode(Mode.CORRECT);
        downloader.download(WSUtil.generateUrlgetPicture(mPictureId, false), mResultImageView);
	}


}
